<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<script>
    function test(){
        var name = document.getElementsByName("username")[0].value;
        if(name!="admin"){
            alert("用户名错误!");
        }  
    }
    function jump(){
        var introduce = document.getElementsByName("introduce")[0].value;
        alert(introduce);
    }

</script>
<body>
    <div align="center">
        <h2>注册页面</h2>
        <hr>
        <form action="#" method="POST">
            <table>
                <tr>
                    <td><label>用户名:</label></td>
                    <td><input name="username" onblur="test()"></td>
                </tr>
                <tr>
                    <td><label>密码:</label></td>
                    <td><input name="password" type="password"></td>
                </tr>
                <tr>
                    <td>性别:</td>
                    <td>
                        <label>男:</label>
                        <input name="sex" type="radio" checked="checked">
                        <label>女:</label>
                        <input name="sex" type="radio">
                    </td>
                </tr>
                <tr>
                    <td>学历:</td>
                    <td>
                        <select name="select">
                            <option value="">~请选择~</option>
                            <option value="">本科</option>
                            <option value="">专科</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>个人介绍:</td>
                    <td><textarea name="introduce" cols="20" rows="5"></textarea></td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <input type="checkbox" name="check">
                        <label>是否同意我的协议</label>
                    </td>
                </tr>
                
                <TR>
                    <td></td>
                    <td><input type="submit" onclick="jump()"></td>
                </TR>
            </table>
        

        </form>
    
    </div>
</body>
</html>